/*
 * @author java_deng
 * @date 2024/11/29 10:01
 * @description
 */
package org.kaka.controller;

import org.kaka.utils.ResponseData;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

public class BaseController {
    public ResponseData success(Object data,Integer count){
        return new ResponseData("0","操作成功",data,count);
    }
    public ResponseData success(String msg,Object data,Integer count){
        return new ResponseData("0",msg,data,count);
    }
    public ResponseData fail(Object data){
        return new ResponseData("400","请求失败",data,0);
    }
    public ResponseData fail(String msg){
        return new ResponseData("400",msg,null,0);
    }
    public ResponseData success(String msg){
        return new ResponseData("0",msg,null,0);
    }
}
